//
//  Fraction.h
//  02-ClassAndObject
//
//  Created by dllo on 16/7/5.
//  Copyright © 2016年 yh. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject

@property (nonatomic, assign) NSInteger numrator;
@property (nonatomic, assign) NSInteger denominator;

- (instancetype)initWithNumrator:(NSInteger)numrator denominator:(NSInteger)denominator;

+ (instancetype)fractionWithNumrator:(NSInteger)numrator denominator:(NSInteger)denominator;

// 化简
- (NSInteger)redWithOneNum:(NSInteger)oneNum anotherNum:(NSInteger)anotherNum;

// 化简
- (void)reduction;

// 加法
- (Fraction *)addWith:(Fraction *)oneNum;

// 减法
- (Fraction *)subWith:(Fraction *)oneNum;

// 乘法
- (Fraction *)mulWith:(Fraction *)oneNum;

// 除法
- (Fraction *)divWith:(Fraction *)oneNum;

// 输出
- (void)info;


@end
